<!-- 我的列表 -->
<template>
  <div class="contain">
    <header-box></header-box>
    <div class="myfile-con">
      <ul>
        <router-link to="/user/msg" tag="li">
          <span class="l-icon"><i class="iconfont icon-files green"></i>我的资料</span>
          <i class="iconfont icon-more"></i>
        </router-link>
        <!-- <li>
          <span class="l-icon"><i class="iconfont icon-ckorder"></i>切换体验角色</span>
          <i class="iconfont icon-more"></i>
        </li> -->
        <!-- 业务员才有start -->
        <router-link to="/user/registersm" tag="li" v-show="meunshow">
          <span class="l-icon"><i class="iconfont icon-invite blue"></i>扫街推广</span>
          <i class="iconfont icon-more"></i>
        </router-link>
        <!-- <router-link to="/user/inviterole" tag="li" v-show="meunshow">
          <span class="l-icon"><i class="iconfont icon-add-people green"></i>邀请</span>
          <i class="iconfont icon-more"></i>
        </router-link> -->
        <!-- 业务员才有end -->
        <router-link to="/user/password" tag="li">
          <span class="l-icon"><i class="iconfont icon-lock blue"></i>修改密码</span>  
          <i class="iconfont icon-more"></i>
        </router-link>
        <router-link to="/user/set" tag="li">
          <span class="l-icon"><i class="iconfont icon-set green"></i>设置</span>
          <i class="iconfont icon-more"></i>
        </router-link>
        <!-- <router-link to="/user/powerRole" tag="li" v-show="roleshow">
          <span class="l-icon"><i class="iconfont icon-privilege gold"></i>角色和权限</span>
          <i class="iconfont icon-more"></i>
        </router-link> -->
        <li @click="loginout">
          <span class="l-icon"><i class="iconfont icon-exit org1"></i>退出系统</span>
          <i class="iconfont icon-more"></i>
        </li>
      </ul>
    </div>
    <footer-menu :status='3'></footer-menu>
  </div>
</template>

<script>
import footerMenu from '@/commonComponent/footer.vue';

export default {
  components: {
    footerMenu
  },
  data() {
    return {
      roleshow: false,
      meunshow:false,
    };
  },
  created() {
    document.title = "我的";
  },
  mounted() {
    this.$nextTick(function() {
      var userinfo = JSON.parse(localStorage.userinfo);
      if (userinfo.UserType == "2") {
        this.roleshow = true;
      }
     if (userinfo.UserBizType == "Salesman") {
          this.meunshow = true;
        } 
    });
  },
  methods: {
    loginout() {
      localStorage.clear();
      sessionStorage.clear();
      this.$router.push({
        path:'/login'
      });
    }
  }
};
</script>
